package com.biglead.mini.controller;


import com.biglead.common.pojo.CommonResult;
import com.biglead.common.pojo.OrderInfo;
import com.biglead.feign.clients.FeignOrderClient;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 商品管理Controller
 */
@Controller

@RequestMapping("/goods")
public class GoodsController {
    @Autowired
    private FeignOrderClient feignOrderClient;
    @ApiOperation("立即购买下单")
    @RequestMapping(value = "/test/loadGoods", method = RequestMethod.POST)
    @ResponseBody
    public CommonResult<String> confirmOrder(@RequestHeader Long userId, @RequestParam Long goodsId) {
        feignOrderClient.testLoadGoodsToRedis(goodsId);
        return CommonResult.success("操作成功");
    }

}
